import java.util.Arrays;

/**
 * @Author @fiber-cloud
 * @Date 2025/6/25 19:36
 */
public class Test {
    //冒泡排序
    public static void bubbleSort(int[] arr) {
        for (int i = 0; i < arr.length - 1; i++) {
            boolean flag = true;
            for (int j = 0; j < arr.length - i - 1; j++) {
                if (arr[j] > arr[j + 1]) {
                    int temp = arr[j];
                    arr[j] = arr[j + 1];
                    arr[j + 1] = temp;
                    flag = false;
                }
            }
            if (flag == false){
                return;
            }
        }
    }

    //打印二维数组
    public static void main(String[] args) {
        int[][] arr = new int[2][3];
        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j < arr[i].length; j++) {
                arr[i][j] = j;
                System.out.print(arr[i][j]+" ");
            }
            System.out.println();
        }
        System.out.println(Arrays.deepToString(arr));

        //不规则数组
        int[][] array = new int[3][];



        Dog dog = new Dog();
        dog.name = "皮皮";
        dog.age = 2;
        dog.color = "黄色";
        dog.wag();
        dog.barks();
        dog.jieshi();

        Dog dog1 = new Dog();
        dog1.name = "蛋蛋";
        dog1.age = 2;
        dog1.color = "黑色";
        dog1.wag();
        dog1.barks();
        dog1.jieshi();

    }
}
